#include<iostream>
#include<algorithm>
#include<map>
#include<cstring>
using namespace std;
typedef long long LL;
map<string, int>mp;
const int N = 2e5 + 10;
int n, p, q;
int a[N];
int main()
{
	cin >> n;
	LL ans = 0;
	for (int i = 1; i <= n; i++) {
		string s;
		cin >> s;
		string t;
		for (int j = s.size() - 1; j >= 0; j--) {
			t += s[j];
		}
		if (!mp[s] && !mp[t]) {
			ans++;
			mp[s] = mp[t] = 1;
		}
	}
	cout << ans << endl;
	return 0;
}